useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser',  commonBits.sampleDir() +  'Ams_LocDownload_20041228.bin')
		click('Edit1')
		select('Table', 'rows:[4,5,6,7,8,9,10,11,12,13],columns:[4|Loc_Name]')
		select_menu('View>>Table View #{Selected Records#}')
##		select('Table2', 'rows:[4,5,6,7,8,9,10,11,12,13],columns:[4|Loc_Name]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Blacktown)')
##		select('Table', 'cell:Field,3(Loc_Name)')
##		assert_p('Table', 'Text', 'cell:Field,3(Loc_Name)')
		select('Table', 'false', 'Show,0')
		select('Table', 'false', 'Show,2')
		select('Table', 'false', 'Show,7')
		select('Table', 'false', 'Show,9')
		select('Table', 'false', 'Show,8')
##		select('Table', 'cell:Show,8(false)')
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[5015, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park], [5019, Penrith, Penrith, 58 Leland Street, Penrith], [5033, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong], [5035, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany], [5037, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda], [5052, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong], [5055, Leichhardt, Marketown, Marion Street, Leichhardt], [5060, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s], [5070, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill], [5074, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
##		select_menu('Window>>Ams_LocDownload_20041228.bin>>Table: 1')
		select_menu('Window>>Ams_LocDownload_20041228.bin>>Table:1')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[Brand_Id, false], [Loc_Nbr, true], [Loc_Type, false], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, true], [Loc_Addr_Ln3, true], [Loc_Postcode, false], [Loc_State, false], [Loc_Actv_Ind, false]]')
		select('Table', 'cell:Show,5(true)')
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[5015, Bankstown, Bankstown, Condell Park], [5019, Penrith, Penrith, Penrith], [5033, Blacktown, Marayong, Marayong], [5035, Rockdale, Building B,  Portside DC, Botany], [5037, Miranda, Westfield Shoppingtown, Miranda], [5052, Eastwood, Marayong Offsite Reserve, Marayong], [5055, Leichhardt, Marketown, Leichhardt], [5060, St Marys, St. Mary\'s, St Mary\'s], [5070, Bass Hill, Bass Hill Plaza, Bass Hill], [5074, Campbelltown, Campbelltown Mall, Campbelltown]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:Show,9(false)')
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[5015, Bankstown, Bankstown, Condell Park, A], [5019, Penrith, Penrith, Penrith, A], [5033, Blacktown, Marayong, Marayong, A], [5035, Rockdale, Building B,  Portside DC, Botany, A], [5037, Miranda, Westfield Shoppingtown, Miranda, A], [5052, Eastwood, Marayong Offsite Reserve, Marayong, A], [5055, Leichhardt, Marketown, Leichhardt, A], [5060, St Marys, St. Mary\'s, St Mary\'s, A], [5070, Bass Hill, Bass Hill Plaza, Bass Hill, A], [5074, Campbelltown, Campbelltown Mall, Campbelltown, A]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[Brand_Id, false], [Loc_Nbr, true], [Loc_Type, false], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, false], [Loc_Addr_Ln3, true], [Loc_Postcode, false], [Loc_State, false], [Loc_Actv_Ind, true]]')
		select('Table', 'cell:Show,8(false)')
		select('Table', 'cell:Show,2(false)')
		assert_p('Table', 'Content', '[[Brand_Id, false], [Loc_Nbr, true], [Loc_Type, true], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, false], [Loc_Addr_Ln3, true], [Loc_Postcode, false], [Loc_State, true], [Loc_Actv_Ind, true]]')
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[5015, ST, Bankstown, Bankstown, Condell Park, NSW, A], [5019, ST, Penrith, Penrith, Penrith, NSW, A], [5033, ST, Blacktown, Marayong, Marayong, NSW, A], [5035, ST, Rockdale, Building B,  Portside DC, Botany, NSW, A], [5037, ST, Miranda, Westfield Shoppingtown, Miranda, NSW, A], [5052, ST, Eastwood, Marayong Offsite Reserve, Marayong, NSW, A], [5055, ST, Leichhardt, Marketown, Leichhardt, NSW, A], [5060, ST, St Marys, St. Mary\'s, St Mary\'s, NSW, A], [5070, ST, Bass Hill, Bass Hill Plaza, Bass Hill, NSW, A], [5074, ST, Campbelltown, Campbelltown Mall, Campbelltown, NSW, A]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[Brand_Id, false], [Loc_Nbr, true], [Loc_Type, true], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, false], [Loc_Addr_Ln3, true], [Loc_Postcode, false], [Loc_State, true], [Loc_Actv_Ind, true]]')
		select('Table', 'cell:Show,7(false)')
		select('Table', 'cell:Show,5(false)')
		select('Table', 'cell:Show,0(false)')
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[Brand_Id, true], [Loc_Nbr, true], [Loc_Type, true], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, true], [Loc_Addr_Ln3, true], [Loc_Postcode, true], [Loc_State, true], [Loc_Actv_Ind, true]]')
		select('Table', 'cell:Show,8(true)')
		select('Table', 'cell:Show,7(true)')
##		zzz
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, A], [TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, A], [TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, A], [TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, A]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		rightclick('Table', '2|Loc_Nbr,3')
		select_menu('Show Column>>Loc_State')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, NSW, A], [TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, NSW, A], [TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, NSW, A], [TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, NSW, A]]')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		rightclick('Table', '3|Loc_Type,4')
		select_menu('Show Column>>Loc_Postcode')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Content', '[[TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A]]')
	close()
